import { createApp } from 'vue'
import App from '@/App.vue'
//引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//引入中文语言包
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//引入暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
//引入svg图标
import 'virtual:svg-icons-register'
//引入模板全局样式
import '@/styles/index.scss'
//引入路由
import router from '@/router'
//引入状态管理
import pinia from '@/store/index'
//引入全局组件
import allComponents from '@/components/index'
//引入路由鉴权权限控制
// import '@/permisstion'

const app = createApp(App)
//挂载element-plus
app.use(ElementPlus, { locale: zhCn })
//挂载路由
app.use(router)
//挂载状态管理
app.use(pinia)
//挂载全局组件
app.use(allComponents)

app.mount('#app')
